<?php
/**
 * Copyright (c) 2022-2222   All rights reserved.
 *
 * 创建时间：2022-09-06 17:28
 *
 * 项目：levs  -  $  - index.php
 *
 * 作者：liwei
 */

//此文件使用程序自动生成，下次生成时会覆盖，不建议修改。
?>

<div class="page page-formb">
    <div class="navbar navbar-bgcolor-red">
        <div class="navbar-inner">
            <div class="left">
            </div>
            <div class="title"><?=$descTitle?></div>
            <div class="right"></div>
        </div>
    </div>

    <div class="page-content">
        <div class="page-content-inner" style="max-width:1440px;background: #fff">
            <txt class="headerHtmBox">
                <?=$headerHtm?>
            </txt>

            <?php if (count($setupDesc) >1):?>
                <div class="card">
                    <div class="card-content-inner buttons-row setups setupsBox" opid="<?=$opid?>">
                        <?php foreach ($setupDesc as $k => $name):?>
                            <a class="button <?=$k==$setup ? 'active animated shake' : 'color-gray'?>" href="<?=Lev::toCurrent(['setup'=>$k])?>"><?=$name?></a>
                        <?php endforeach;?>
                    </div>
                </div>
            <?php endif;?>

            <div class="form-mainb" style="min-width: 600px">
                <form class="card MyFormID_<?=$formID?>" action="<?=$formAction?>" method="post">

                    <txt class="FormInputsBox">
                        <?php echo \lev\widgets\inputs\inputsWidget::form($inputs, $inputsValues, $formPre);?>
                    </txt>

                    <txt class="FormExtInputsBox">
                        <?php echo \lev\widgets\inputs\inputsWidget::form($extInputs, [], '');?>
                    </txt>

                    <txt class="FormFooterInnerHtmBox">
                        <?=$footerFormInnerHtm?>
                    </txt>

                    <div class="card-footer FormSubmitBox hiddenx">
                        <button type="submit" class="button-fill button wd100 submitFormvBtn<?=$formID?>">
                            <svg class="icon" aria-hidden="true"><use xlink:href="#fa-save"></use></svg>
                            保 存
                        </button>
                    </div>
                </form>
            </div>

            <txt class="FooterHtmBox">
                <?=$footerHtm?>
            </txt>
        </div>
    </div>

    <div class="toolbar tabbar tabbar-labels email-pp-toolbar">
        <div class="toolbar-inner">
            <a class="button button-fill card wd80 wdmin submitFormvBtn<?=$formID?>">
                <svg class="icon" aria-hidden="true"><use xlink:href="#fa-save"></use></svg>
                保 存
            </a>
        </div>
    </div>

    <div class="LoadPageAjaxJS">
        <script>
            jQuery(function () {
                var myFormID = '<?=$formID?>';
                var submitBtnObj = '.submitFormvBtn'+ myFormID;
                var formObj = '.MyFormID_'+ myFormID;

                Levme.script.ajaxFormJs();
                Levme.onClick(submitBtnObj, function () {
                    Levme.dosaveForm.dosubmitV2(submitBtnObj, formObj, 0, function (data, status) {
                        if (status > 0) {
                            Levme.closePP(true, true);
                            Levme.setTimeout(function () {
                                window.location.reload();
                            }, 1000);
                        }
                    });
                });

            });
        </script>
    </div>
</div>

